Delete message logic with locks. Alert messages logic for redirects.