Minor refactorings; root context cannot be stubbed