cleaning up API removing SubStateMachine dependancy on State class