Move handling of URLs into GAM