Refactoring to reflect changes in controller.