added functions to save off the friends list in a way to prevent unnecessary calls to the api

demo usage added in driver.js