assets controller refactoring