Optimize CRUD functions