Moved refresh outside the thread to prevent race condition
CircleCI file for Heroku