Refactor + remove some duplication
Merge pull request #6 from AydinHassan/refactor

Refactor + remove some duplication