XD-153 Gauge module implementation

The code is essentially a copy of the RichGauge implementation
with the simpler Gauge type.