Adding some documentation and more tests