Adding wrapper functions for setting preferences in localStorage and optimising selectors.

preferences.get(key)
preferences.set(key, value)
preferences.unset(key)
Removing this as it's buggy in non chrome.