changed a unique_ptr to shared and returned unoredered maps to hold Paths

May still need to initialize the pathbyHandle (I may have missed this somewhere)