Make LoopProvider wrap around correctly

*** First version where the harness works ***