Moved processing of certain terms so that all non-certain ones get ids from 1 throught to n
Extracted duplicated code to a new method
Changed implementation of eventToTerm map to LinkedHashMap to provide consistent ordering of terms
Merge branch 'term-man-fix'