tomdoc cleanup