Refactoring, preparing for recursive directory traversal.