Add tests and scripts