Better documentation and some more test cases