Corrected an issue that caused the script to ignore the very first sleep state change.
- The script now looks for the next sleep state change and compares the change it's currently on to the next, instead of setting an arbitrary start
  point of '0' ahead of the loop.