Added some code to detect swipes, not fully functional yet