Adding lib/Relay.js to help manage events