Some ruby style refactoring
Merge pull request #490 from PagedeGeek/some-refactoring

Some ruby style refactoring