Touch event fix

On the Surface and some window touch interfaces, mouse events are issued when tapping the screen. Depending on how fat fingered your touch is, a mouse move event may be issued in between the mouse down and mouse up.

A tolerance has been added to provide a more consistent tap gesture.

I also cleaned up a few things in the file with this commit