Working on model/meta object factory...

Before we can continue develope model-gen tool to support dev, we need
the model factory for controlling the code def tpl.