Moved url checking functions to new file