Modified is_valid_url() to check against a more comprehensive regex pattern, removing chance of crawling down a non-html page. is_valid_url() is now called with the correct url of the link, rather than just the end.
Adjusted input parameter parsing to be more flexible to later addition.