clean up; added support for refreshing the OAuth 2 access token