DRY a little bit.
Merge pull request #135 from cenouro/remove_duplication

DRY a little bit.