Extract URL components into a separate Components class