Class for DHT11, DHT21 and DHT22 (temperature & humidity)

Possibly related, maybe not:
I'm getting a fair number of checksum errors (Approximately 1 in 10). Is there a way to reduce that number? Any suggestions?