Refactoring og factory CRUD classes to Controller and Factory Classes