Refactor and finish Erase.