major refactoring
Merge pull request #10 from tttor/refactor

major refactoring