Rewrote mouse scrolling handling.