Fixing URL.
Fixing hotpotatoes link see #5994
Formatting code, fixing PHP warnings see #5994