add event emitter and response handler
use constructor fn and make output pretty
add response handler to config
add tests for events