Fixing some of Dwight's and Grigore's comments:
   - removed VarHashMap and replaced it with com.google.common.collect.HashMultimap
   - tweaking some of the definitions
   - making the code a bit more readable.