[Generator] made some simplifications
Merge pull request #439 from hhamon/model_refactoring

[Generator] made some simplifications