Move variables_map to a deeper scope