all hail the power of Multimaps
passing class references is bad
fixed some casting issues
Merge pull request #24 from AbrarSyed/master

Fixes #22