generates models, fixes naming