Clean up vector projection code