Update tests. Refactor and simplify re processing logic.