Refactor touch event abstraction