Simplify SearchForPath by extracting methods