Added state/options syncing functionality.