Context refactoring (immutable)