Refactor the clean method.
Refactor the clean method.

Signed-off-by: onevcat <58d0c0df3ea9eba666b421252347024513bf8bb5@gmail.com>

foolhuang/XUPorter,sq5gvm/XUPorter,onevcat/XUPorter,trampliu/XUPorter,maoi/XUPorter,zhutaorun/XUPorter,karlgluck/XUPorter