Pre merge rewrite of map_genome.pl