fix to #44 and cleanup.
Merge pull request #118 from sumansai14/master

fix to #44 and cleanup