Added the start of a sorting function, may or may not even finish it.