small cleanup and refactoring changes
Merge pull request #182 from CodeHoarder/master

small cleanup and refactoring changes