Added some intermediate tools and implemented AST