Change middleware to be configured via the "builder" pattern