Small refactorings to remove some code smells.

For issue #231.
Merge pull request #251 from gilles-leblanc/reek_smell_free_2

Small refactorings to remove some code smells.