Refactor __k3_context into a separate header.