Merge pull request #205 from csoroiu/master

code clean-up