Fix cursor aspect ratio bug, namespace problems with distance()