Merge pull request #49 from Shuhrat/master

Some refactoring