Update hashmaps on pref changes, and serialize properly