Refactor the way to add middlewares from the configuration
Update the version