Fixed suboptimal splits (DistpatcherMiddleware test added)

Some splitting (and joining) have being used in a sub-optimal way.