Merge some corrections / new feature from original Adafruit repository.