fixed shutdown & error handling implementation + changed constructor signature and defaults + fixed docs and tests