Add middleware functions, so we can intercept middleware functions after boot