Updated comment.
Minor formatting edit.
Created separate "error" and "usage_error" functions,
to report error differently depending on nature of error.
Made error message print to stderr instead of stdout.
Merge recent changes in 'master' branch into 'stable_ordered' branch.