Changed way state machines work to something more sane. Each state in a state machine has a default_state and a flow. Flow is a map of states which each entry having a map of actions to new state. Action validation by state is currently disabled. TO-DO, change over validate action for state to new schema.