Restructured sorting algorithms to allow for better encapsulation. Not sure it is an improvement..