clean up and implements ticket refresh