WIP

change the interface of FormattingWriter, add some documentation to the class