Even further refactoring of tests and ASTQuery.