Adding documentation and adding a few test cases