Hooking into middleware from my branch of ramrod.