Refactor Sort Command

I noticed that the SORT command was listed as unsupported, so I decided to write some tests to see why.

Once I wrote everything correctly, it appeared to be working, but I refactored a bit anyways.

Let me know what you think, and if anything needs to change, let me know.  I don't spend a lot of time in Java...

Thanks!

-Aaron