Refactoring vectors in drawing