Update kernel to include middleware