Refactored touch interop to handle pointer-based touch API.