Minor changes and clean up code
Merge pull request #421 from gergo85/patch-32

Minor changes and clean up code