Move models and views generator to flat structure