Created clearDataNum and bgFullResyncNum so I can have more control over when to refresh data, and decoupled it from appVersion