Start some refactoring. Added State and Status class
Use state.status and drop old methods in manager