Communicate with model2xml module and fix some bugs while building model objects