Perhaps the reason for the episode-end levity is that the ship had a cloning chamber installed. This would also explain some of the character recurrences.
"He's not really dead, as long as we remember him...and our cloning chamber works."
Obviously Spock couldn't be regenerated because Khan's attack damaged the chamber, hence the sadness at the end of TWoK.

"He's not really dead, as long as we remember him...and our cloning chamber works."
Obviously Spock couldn't be regenerated because Khan's attack damaged the chamber, hence the sadness at the end of TWoK.
