Added AST and related functions
Merged resolve