Factor rrd shit to a util module, fix up a bit