Moved copyMap out to map.c.