As usual, convert more raw types to generics