Constructor and context passing for CDT class.