Small additions, as well as changing mem to buf to use a vec for avoiding a stack overflow
fix a stupid
Rewrote lib.rs to fix numerous mistakes and tidy up with constants
You can also use your local clone with git send-email.