Various changes to make more tests linking