Merge pull request #3 from Mirantis/master

sdf
small refactoring and bug fixing
Merge pull request #73 from dukhlov/master

small refactoring and bug fixing