reduce raw types

close throws an IOException but I'm sure I can clean this up some more.