Add ability to inhibit event loop
Fix broken tests