Updated delete statements
General refactoring