Improved code for definitionContext, context execution.