Working on ResourcesController functions so they can be reused by other views.