Remove $app variable from share function