Added flatten and variableNames_in_ast