Gradle-ify; use generics for EventHandler for cleaner API