Still more refactoring
Merge pull request #55 from pioneerit/dry

Still more refactoring