First pass at middlewares.