Revamped share script a bit.