URI parsing and generation