Refactor writers to make use of common infrastructure
Remove unneeded variable