Finished up part 4 of refactoring 5 (the .extractPath() method was
deemed necessary and used a few other places).  Shortened up the method
in refactoring 1.