move realize_headers to signature4.ml
created monad.ml and cleaned up s3.ml