um wes: release resources in the closure
chat backend middleware: create dummy one; fix require of it