Refactored the touch interface functionality