merged the code, and run correct
do some clean work. fix some build warning