Introduce middleware-layer.