Merge pull request #1 from davidgao/patch-1

code review season 1 wow~
rewrite

rewrite z_main,z_control,z_global
some resource change