Updating controller for new template structure