Simplifying the execution of middleware