Fix the dead letters.
fix tests
add plugin + refactoring