Aggregate all middlware funcs in a single static class using partials. C#6 will make things easier with static using directives (using Owin.Limits.OwinLimitsMiddleware). Put all builder extension methods (this Action<MidFunc>) in a separate extensions class.