improve courier _plugin, remove unit test stubs for middleware since they are covered in the application integration tests