Update Main.py

Changing the logic of the program to fit in with the idea of states.