Fixed minor implicit conversion issues, using floats instead of doubles