handlers and error handlers now go into the same list to be passed to dispatch, minor refactor