Fixed a few refactoring mistakes
Fixed the test case_1