Fix bug

- Append condidates for ^ and $
Implement thesaurus complete.
Refactoring