Refactored vector conversions.