Redesign to decouple state machine from event loop, converted all units to coding standards
patched iTrek to sst 201307 version