Vector refactoring