Final improvements to mouse movement