Better mode selection

Ability to exit within various loops
Ability to control and exit via wifi