Renamed the type() field to mode() in the Event annotation
. Also renamed EventType enum to EventMode.
Adding comments to one test.
Refactored a few things and fixed a compilation problem cause by a previous commit that changed from type() to mode() in the Event annotation