[DO NOT MERGE] Integration method

Highly experimental try to refactor the top level integration code.