Also adds concept of locally stored preferences. Change-Id: Ib074a682228d5360a932af696e18967e8e3473be