Added a switch to turn swiping on/off