Fix issue with interpolating values into JavaScript. Fix an issue with totaling up events.