Global refactoring
Merge pull request #31 from topilski/master

Global refactoring