Added state transition limitations

Added allowedStates array to state object so we can limit which state can transition to another state. This creates a more tightly coupled state machine.

Updated tests to reflect new feature.

Updated Readme to reflect changes