Refactored preferences store. Fixed preferences reading on automatic
synchronization