refactors crudMB to be used by other projects