Make type class trickery not terrible