Added skeleton code for State Machine

Barebone code structure for state machine, needs implementing