[Bug Fix/Refactor] Some fixes for the downgrade to Java 6./Fix Custom Events.