Split url decoding routine into smaller units.