Fixing up hooks, Added some AST functions.