Reworked XML output, finished ZContour, comments, etc.