Added comments and fixed bug where dTime before and after sums were based not on absolut value summations- avoids problem of -1 + 1 being counted as a state change.