tweaks to get everything working in prod, add events support