add resize and close events, removed the game class