update the source code layout

This changes are the latest updates in Source Code Layout part from ruby style guide (https://github.com/bbatsov/ruby-style-guide) by @bbatsov.