Add tests and modify README