WIP

Undo changes to lib/domain.js for easier testing. Continue to figure out
proper EE observer API.
WIP: checkin