Add EventsAPI as a library, I think. WIP commit.