Unify url and keys functions