Added Kernel middleware