Util cleanup and refactoring
Merge pull request #155 from rostafiychuk/utilrefactor

Util cleanup and refactoring