Merge "Refactors initial directory scan to be dryer"