Refactor FilesControllerBehavior