Fix declaration of the callbacks

Declare the callbacks as nested public static classes
Don't instantiate objects: the native code will perform it
Fix typo
Call some functions in Example.java
Some clean up