Optimize the trackball.