Refactor.


Signed-off-by: xinzhao-acutate <xzhao@actuate.com>