Remove some defines
Change the runloop waiting to use a runloop observer rather than a poll
Change error reporting to be a bit more helpful.