Moved code back into map/set.