Avoid monkey patches

Also makes digest spec a little easier to read