First pass at coding up the writer