Rewrote mouse movement code to keep sampled average of mouse movements with divisor factor of 1.5