Updated sorting methods with generics and updated testing to include different comparable types