Refactor swipenav