changes batteries to use the non-deprecated forms of its middleware components