Changes to how AppCtx is used

Try to harmonize the use of AppCtx in which all functions require a
context that get's passed to the underlying backend functions. They in
return respond with a updated context that get's handed back to the
caller.