add clean code and some test code

Signed-off-by: yuanhuan <yuanhuan@tcl.com>