refs #582 - fitted generated code for controllers in rest-new project.
refs #582 - Moved getting flatMenu to services.