Refactoring controlers