added model, mogenerator, some tests.