Refactor code to use UniqueID as the baseId instead of Id for sync purposes