Adding in more robust URL generation