Add more tests which were missing before. Cleanup the test cases and reduce complexity of some tests.