Separated hosts functions to own file.