writeXmlFile uses now LSSerializer which does a better job with xml formatting
Fixed bug in buildDeploymentStructure. It now creates top level modules and removes duplicates from the sub-deployment modules