Add send middleware, to help with simple debugging.
remove dead tests