Adding a New controller and refactoring