dwarf: some serious improvements