cleaned up some of the nonsense from x_edshare.pl