Add test cases and their fixes
Added test cases and their fixes

These are the matching tests from the previous bold commit.