Major rewrite

Cleanup of entire source; renaming classes and splitting into different
files
Using map containers instead of vectors
Introduced a means of passing parameters to events