Added new test cases and fixed the ones which failed.