Rework context class.