Now we can handle typeclasses!

Note: The method by which we match typeclasses is ugly and brittle,
and ought to be changed eventually.