Further improved pkt_parse and parse_subtask.