Minor edits to sharing code