First pass at term and suggest feature

Seems to work pretty well in a few scenarios that I tested, but still
needs some good error handling, unit and integration tests, etc.