LOTS OF CHANGES

Made the biggest state machine you will probably ever see, and re added
the button detector