Incomplete migration of old code to create the integration object. A bit of a mess with this commit.