first attempt at cleaning up documents_controller methods
more refactoring of the documents controller
refactoring documents_controller.
more refactoring. Throw it all in the application_controller!
Merge branch 'master' into ui