Replacing references to the context