Refactor event listeners

Currently there are many common source codes shared between mouse and touch event listeners. Would it be better to move them into shared functions?