clean up the JNI bindings

Signed-off-by: Iliyan Malchev <malchev@google.com>