Better js in Updating events and photos