debugged endgame
minor tweaks