clean up the drmGetMap/drmMap code