polish the comments.
add a condition more for similar clean.
fix the unit test cases.