moving model class generator into framework