more cleanups of new map reduce code