Merged Blob(), SetFormat() and memleak fixes for Error(), from Terry-Mao.