CompletionWords: simplify the library code