Improve pool hosts code