reuse magic cookie, improve errors

Noticed a few low-hanging TODOs when benchmarking with another go project. Great library, thanks!