Implemented a more fine-tuned touch handling