tomd: correct bug with setting gauges to negative values
tomd: extract common code for message construction into a method
tomd: whitespace