Adding middlewares
Updating middlewares
Replacing before_/4 with before_/5
Using proper function to merge headers
Updating middlewares behaviour