Small refactoring
Merge pull request #196 from andhieka/working

Small refactoring