Fix docstring and add more tests