Tweaks to code to introduce validation of metering messages