clean up and pull out link checker / audit common code