Refactored project controller.