Fix Golint errors, except for all the missing comments.
Fix `go vet` errors.
Flatten nested ifs with DeMorgan.
Revert `go vet` incompatible changes (go1.0). More magic numbers.
Merge pull request #31 from aybabtme/master

Fix `golint` and `go vet` errors, removes a couple of magic numbers. Flatten nested ifs.