of std::map. This is significantly faster. I also added some missing asserts to validate that the map problems supplied by the user are valid.