This includes some cleanups from !312 (merged) and !332 (closed)
and should be pretty uncontroversial