complete map class and fix CoordinateTest bugs