Added prioritized middleware chain.