Fix dvi processing and be (a tad bit) less hackish