Adding some test cases and fixing them. One test case still broken.