JNI updates, need to remove Graphics dependency