Added intermediate resampling. All old stuff now removed/integrated. Numerics still to do.