Reorganize code

Author Sasky <sky42ks@gmail.com>
Author date 2014-06-12 05:39:03
Author local date 2014-06-11 22:39:03 -0700
Committer Sasky <sky42ks@gmail.com>
Committer date 2014-06-12 05:39:35
Committer local date 2014-06-11 22:39:35 -0700
Commit 97d72fee02ac675c107aa033d3b5b110f1f33bf8
Tree 1dee640e8b634dd5731437d90699949379609ea5
Parent a549ca42fb951f9eba9539bac9d7f74837b8997e
Reorganize code