Refactor the API to use models for DB ops