delete some dead code & comment
allow parent app to pass config directly to middleware