first attempt at cleaning up documents_controller methods