Added command line and better URL checking