Refactor a bit
Merge pull request #178 from yujinakayama/refactor

Refactor a bit