Update documentation and add more tests