In general, these are things you should not do at the controller level, controller should control the business logic, not the UI. You can move these assets into specs in application.json or into the mojit's defaults.json.