refactor GenerateEvent
support xlabel and wizard callbacks
escape data
support empty models
bug fixes