This required adding the ability to have hishtory run synchronously to avoid reconditions. I also added additional waiting code. Also a whole bunch of new tests and disabled gorm's default logger which also caued flakeyness