Remove unnecessary code
Improve test code