Clean up parse tree