Tidy up touch event handling.