Refactor.
Refactor vector code.