Cleanup: use std::vector rather than a raw array.