code refactoring of Ruby side
Merge pull request #4 from nadavmatalon/refactoring

code refactoring of Ruby side