Replaced vocabulary dictionaries with classes