Remove localStorage usage for api.id and use IDB instead.

The api.id will now be stored inside of the META-STORE object.
Got rid of unnecessary if statement
A few style changes and other minor fixes
Merge pull request #360 from benrudolph/replacelocalstorage

Replace Local Storage for api.id