Use pointers to vectors, and slices

Avoids copy vectors values.