Slight refactor in SharkContext.