Fixed controller state machine logic.
Updated .gitignore