Renamed ext_num -> ext_type, added const to cb in*.