IsEndOfGame rewritten to Linq
Script cleanup