adding more options and tests for integrating with hapi, and a bugfix around the status code