Major performance improvements for integration tests.