refactored the statemanager, deleted states. SM now only records current state and should be responsible for location logic