Added Events, and API to access them with JSON.