Plenty of duplicated code removed (>50 lines)
Merge pull request #90 from nurkiewicz/duplications

Plenty of duplicated code removed (>50 lines)