Moving healthcheck logic to helpers.