Refactored state change route