Added FPS calculation and keyboard input.