Fixed sorting of events
Implemented filtering of events