More progress towards a functional hetfa writer.