Corrected Context Managers and ChainedLookup, that were not functional due to code incoherences