Fixed #9 and (hopefully) #10. Limit swipe direction.
Improved swipe detection.