Refactored source codes.
Merge pull request #4 from kohachori/master2

Refactored source codes.