Added better CRUD operations in the api and model