Move non mailout related stuff back into the base library