More work on write functionality.
Minor updates.