Andrew

Added in a bunch of sorting functionality