WIP: experiment with type classes
Merge branch 'master' into typeclasses
Finish selection type classes