CRUD working but not well structured