redid the sorting function to be as simple and readable as possible, though had to make few previous functions static
redid the sorting function to be as simple and readable as possible, though had to make few previous functions static

bitter/android-jni-bridge,bitter/android-jni-bridge,bitter/android-jni-bridge,Unity-Technologies/android-jni-bridge,Unity-Technologies/android-jni-bridge,Unity-Technologies/android-jni-bridge,Unity-Technologies/android-jni-bridge,Unity-Technologies/android-jni-bridge,Unity-Technologies/android-jni-bridge,bitter/android-jni-bridge