Reduce memory allocations

Use std::vector with reserve() instead of std::list