Merge from upstream.

 * Pull out appId fetching into own class.
 * Document external helpers in README
Fix typo in manifest, remove dead code.
Merge pull request #3 from google/refresh

Merge from upstream.