Moving url parsing into utils