Merge pull request #2 from Dinodog/master

Resolving conflicts with the last merge
some cleanup after merge