Moving the url and token to where they are needed. Not sure if this memoization will work