Merge pull request #5 from ProPercivalalb/master

Gimme updates!
Fixed warnings for the lolz (+ some logic errors)
Merge pull request #18 from chylex/master

Fixed warnings for the lolz (+ some logic errors)