Changed arrays to vectors.