Clean up license comments.
Add license comments, and comment out unneeded code.
Match Math.random by using the range [0, 1) instead.