Rewrite project

add my tools
transfer encoding to UTF-8
rewrite code to my style
fix some bugs
add comments