borrow Dirk's Makevars
various tweaks