Refactor for CRUD