Refactoring JNI Hub