Fix as many raw type uses as possible

Two couldn't be solved, though; and the others are in deprecated classes.