Fixed the sorting test case so that it actually checks for proper ordering. Removed the debug output.