Refactors state-override space handling
Fixes jslint errors
Fixes state-override doesn't work with uppercase characters