code clean up,should be good for version 1.1.0 to be released soon