Added touch detection.