Added rudimentary stupid backoff algo. Minor updates to scratch script