Better handling of ecobeeType in iterate functions

- also, minor bug corrections
- corrected some comments