Got sort working, though it is inefficient.