Code cleanup in WorksheetWriter