Removed global variables for notifications; use now pipe instead of eventfd for mainl...