input term deduplication, and other updates