I don't understand why not use function chaining, Javascript style. Make the order of execution explicit through scope.