Added input processing and timesteps in game loop