cleanup path list processing code