Some cleanup work for the unit tests