Added server msg for refs, and added insert ID to fix add-delete bug