Added more test cases
Made final fixes