New test in SaveBuffering() to account for being in a transaction.
Removed EMDFUNC and ENDPROC calls.  Also cleaned up the file header.