Now only available events are displayed
Cleanup code