update following blog post

* Switch to Writer monad (no need for getting state, just putting, so
  State not needed)
* Rearrange code a bit; remove unnecessary ToLazyByteString typeclass.