Pseudofunctors

This is on top of #269 and #274.