* Force STATE_CLASS_TOTAL_INCREASING to reset to 0 * Tweak * Correct detection of new cycle * Fix typing