Add get_interface method to Pattern class, simplify src_idx, dest_idx methods.