clean code, fix some issue
add comments to files