some refactoring; extracted ModelInstanceFactory, however it seems not to fit...