Some improvements

A few idiomatic improvements
Perf stuff (esp. the memoize commit)

You can take or leave (or tweak) the `(take 10 (shuffle all-codes))`. I just wanted a way to test without waiting a long time.