Update and add util functions for host management