Re-factor, putter

Moved some functions out of main into new class JNIUtils. Test.java no
longer returns List<String> since iteration over a List using the JNI is
evidently not supported...? Minor tweaks.