Minor controller change

end of game is now less error-prone, frame is made in main so that
repeat runs don’t cause issues