refactored how resource objects and their forms are handled in the controller and the resourceHandler