rewrote settings.js and storage.js to Angular services (fixes issue #21 and WIP for #26)