Add parsing and writing of records