Refactored some NamedList's to use HashMap's and TreeMap's instead. Simplified some of the logic. Refactored the list of terms extractor into his own class