Fixed various problems, most notably type class parameters nested in other types
First experiments trying to get generics to work
Generic methods in type classes