Cleaning up mouseJoint functions