Optimize Events.java