This MR will supersede !34 (closed) and !27 (closed) as I created a big mess while working on those two.