Updated code to be compatible with Hapi 5.0