Added a .gitignore
Added a basic state machine to the main loop