Test: util now handles unexpected errors
Refactor server specific functionality