Add tests, and fix some requires