Add Mac OSX .DS_Store in .gitignore
Remove white spaces
Refactors some code in the checkout, +DRY
Merge pull request #1 from Davidslv/dry-code

DRY some code