Starting refactor using a non JNI interface.