obj2map equivalent with prewalk. first cut
obj2map equivalent with prewalk. cleaned up.