Added functionality for handling touches.