Update of the writer and reader helpers
Adding some tests and correcting some errors