More rendering updates (new formula for distance calculation)