A bunch of changes to make tests happier.