Rewrite the test suite for better compat and stability