Adding error handlers and generators