Big large code reshape on the Xem-JNI bridging stuff