Simplify hostname handiling