Better mouse handling