Context refactoring step 1