Move uri parsing to common header