Extract event business logic from app.js to EventsResource.js