Make checks DRY (as discussed in #12)
Merge pull request #13 from rafalchmiel/master

Make checks DRY (as discussed in #12)