Refactored controllers to be states instead