Improved swipe detection

- Added some additional checks for swipe length and swipe direction to filter out invalid swipes