Minor cleanup of argument checking, and HTML niceness