Tidying main game loop and classes