Slight JNI Refactor