Adding sketch of the model generator code. No testes, do not use.