further mods and fixed tests