Re-working how returnURL is created