Minor refactoring of suggestion API

Semi-related: To respond to the comments at #315, I would like to say that getting the tree allows searching by regex, to account for filenames ending in `.txt`, or even names like `LICENSE-GPL`.