finalized some of the resampling and the merging that was causing some issues.  This code is at a near production state.