Moved the xml parsing code and porcelain into parser.
Updated main with new parser related calls.