Cleaned up some of the vector functions so they match GLSL.