Refactored the models and controllers to work according to an altered schema