Changed location of url code, and removed url function