globals removal, part 1

removed duplicates, dup_map