Refactor message delete to a delayed task