refactor
cleanup
move tonewriter