Reindent code. Add more test case.