Tests and STRICT mode fixes

Based on #69 with many more test-related changes to make them all work (again?).

Doing a PR for some code review.