sharing JS improvements