Add command line options for analytic hms, and a self test