Basic move scheduler loop.
Changed mapStatePriority to mapState.
Emit better state transitions.
Schedule moves by state priorities.