Fixed state importance
Refactoring - clarified names & cleaned up switch statement noise