Refactored controllers.clj and model.clj

Less code for routing and sql