Some improvements to seachPaths.py from mike