added application interface and compiler pass; added allowedEvents to the bridge; added more logging;