changed failure_threshold check to account for failure_thresholds of 0
removed superfluous enable and disable calls
docstrings and comments, you are welcome!