Refactor the way we use CodeContext.