mega refactoring of the dead