Use better std::vector interface