Implemented writing ArrayBuffers to the filesystem. Changed some function names.