Some basic refinement in codebase

Hi! Thank you for providing an useful gem.

I found tiny coding problems better to be fixed.