Bug fixes, AST to XML for easy visualization