Made several changes for sync.