Migrate on new AST structure.
Fix tests for AST.