Add tests and fix readme