I find this format easier to read, because the definitions are at the expected indentation, making it easier to find what I'm looking for.
Each opened app (screen) is pushed on a stack, which is then popped from when returning instead of hard coded "previous apps". Return swipe and refresh directions are automatically determined from the app transition.