Code Quality
Merge pull request #4 from mhor/patch-1

Modulated code by moving chunks into their separate methods (thanks to @mhor)