[RFC] Content negotiation middleware + minor tweaks