Files Controller refactor

Moved our modified code from comfy files controller to our own CMS application.
Add some specs to the files controller too.