Test cases have been added
Small code prettify has been done