Add tests and update README.md