Remove unnecessary code.
Add test case