Adding more tests, improving docs.