Correct the extension of the package to xml.
Use the pretty printer to write files.
Moves ModuleType to base.