[Polylines] New hashing method, clean orphans, events