cleaning up parser and tree