Refactor back button.