Changed all sorts routines to be non static. This significantly reduced the amount of test code we have to write