Changed gl functions to double version. Added unit conversion methods.