First pass at integration code