Refactor to get hosts via a page