Use the `Uri` class instead of manual string manipulation.