Finished deletion, refactored code