Test suite/codebase cleanups

No significant changes except major cleanups that I need to work with the static inspections.

Depends on akandels/contain#20