Refactor swipe handler to ui.js