Use MAX_LENGTH constant for random length max

`MAX_LENGTH` wasn't being used.
Merge pull request #2 from mtodd/patch-1

Use MAX_LENGTH constant for random length max