Refactor exec context and scope a bit