Added app-wide touch-detection functionality