Add tests and readme and code