Moved code out of main() and added keyboard input
Implemented commands and acceleration