Init of sharing code