Refactored controllers to use model classes instead of JSON views