Get thresholds working. Remove some unused RRD code