added pragma
added secure encryption of accessToken
cleaned up code