Some work on integration.

Didn't get too far...