Merge pull request #52 from Zhang/master

merges refactor
finished refactor
refactor complete
Merge pull request #53 from kang/master

refactor complete