Refactor pre-deletion of subs