cleanup of section 3.1 and 3.2, up until eq 18 where I got confused
(#248)