Minor JNI refactor

Commenting and a very small function refactor for ksdensity