Various changes to sharing.php