A bunch of fixes for the Strata integration

Integration tests passed on my machine with these patches installed.