Adding more test cases and improving the documentation.