Closes #2. Added custom sorting algorithm ability. Seriously updated sorting algorithm. Added tests for the sorting.