moved majority of preample into dan.sty