Added basic command structure.
Added functions to write current buffer to file.