Added type_id query to Ring_Query class.