move CRUD operations to model. Rename generator to generate