Refactor CRUD controllers and views