Created simple control loop with keyboard input.