Cleanup codes.  Replace var with  val, Remove redundant `return`, and so on.
Merge pull request #30 from kmizu/r/many-fixes

Cleanup codes