Code tidy and retry loop added for activation with backoff.