Added detection of touch devices.