cleaned up code URL checks