More work on AST visitor