Refactored and upgraded local_store.js
Added spec for local_store.js