Refactor and deletion bug.