Better implementation of make-map.