adding globals file (empty for now). transform work macro into do-work function (much simpler), made work a thin wrapper around it. fixing bug where calling stop multiple times fired an "event already freed" error