added share button, reorganised js