Fixes and improvements

Good job, again!
To fit with the latest PR.
Merge pull request #4 from Vexatos/patch-2

Fixes and improvements