Replace std::map<K, V*> with std::map<K, V> to handle ownership and deletion of the values.
Remove indirection of vector<T*> in favor of deque<T>
Remove some unnecessary vector::reserve/assign calls.