Pulling StateImpl out into a seperate class for serialization and marshalling purposes
Refactoring StateMachineImpl to use new StateImpl