Cleaned up code to check hostonly networking