Use vector of pairs instead of std::map for factory functions. Retains ordering and no map-specific functionality was used anyway.