Refactored all callbacks to interfaces to enable SAM conversions in Java 8.