refactor: simplify localHostName property handling