obj2map equivalent with prewalk. cleaned up3.