BF: Remove some duplicate code, allows root_paths to be a generator
BF: Fix min depth and exception handling
TST: Fix up tests
CLN: Clean up some style issuse