Clean up and add test cases, but still failed 2 tests