Eraser code improvement