Tokenizer refactoring - phase 3

Introduced HashSets here and there