Replaced some uses of Map with TagMap and HashMap.