Improve code style

Fix:
.nil?
indentation
fixes as per AlexKlim comment
Merge pull request #1 from abotalov/patch-1

Improve code style