MRY refactoring (that doesn't affect performance)
Changes after review
Merge pull request #75 from wajam/alex-mry-refactoring

MRY refactoring (that doesn't affect performance)