Add -Wextra
Fix mismatched types comparison
Work with the random distribution rather than cheating it (more random, but slower)