Improve use of vector operations.