broke out sorting and functions into JKSorting as a static class.