Refactored models, added all api routes