general refactor
Merge pull request #8 from sammla/refactor

general refactor