refactoring related changes
Merge pull request #32 from jschnasse/master

refactoring end!