Move main state machine out of button event handler
Merge branch 'master' of https://github.com/HrNilsson/TIWSNE.git