DictionaryPruner made into class.