Added end of game check, and improved Controller interface.