More work on typeclasses.