better isolation between pieces using a decoupled model. adding data registration. implementing some of the feedback from @ericf
updating sample after refactor