Adding data layer and delegation for gesture handling