Converted most collections to use generics, converted all Comparable and Comparator instances to use generics, and dropped most casts.