Further work on AST transformation