Added endgame processing and scripts