Simplify context code