Fix code errors that arose from complex merge

This makes all the tests pass! Various imports and template errors that came from merging 4.1.0 in.

Merge request reports

Loading