simplify and improve pushState and touch detection for TapHandler and History