Agpush 727

Fixed AGPUSH-727 and minor documentation updates.
We should generalize this logic to a service, e.g. `ContextPathProvider`