Improved the way mouse positions are observed.

Fixes #39