signing binary documents works again - first pass (still some cleanup to do, but this is a good start)