A little bit of refactoring to enable us not to get lost in the depths of function calls