Added some testcases and updated the comments.