Removed pointless const from return types
Changed Length and LengthSquared to return double as to avoid problems with very large vectors
Use more sensible function naming standard