Refactor tab navigation helpers