"return 0" is usually the last command before the program quits. It means that the code has executed without errors.
The writers of the show originally planned to end the episode with the David Bowie song "Heroes," until composer Ramin Djawadi presented them an original piece he composed and they chose to use that instead.
Cameo: Jonathan Nolan, creator of the series and writer of the episode, can be seen on Times Square among the bystanders as Harold arrives.
The USS Garner is a homage to actress Jennifer Garner who starred on the J.J. Abrams program Alias (2001)