first stab at integration framework

@mpuncel 
I should probably just rewrite this in Go.