Clean up getFilesInTree to make it more readable