Minor code improvements, using variables to store URLs & error codes.