refactor integration to use ast
refactor parser to use ast
continue refactor to use ast