Updated many functions

Tested and updated the writebuffer.  It is now complete, finished
commands 3 and 6.  Ran through a couple of hours of testing.  All looks
good.