Changed to use emplace*() instead of insert().