Removed nHeight which is not necessary to function, though its easier to read if it was there.
In GetNextWorkRequired(...) there just can be 2 cases, either DiffMode == 1 or DiffMode == 2 so to avoid a warning by the compiler and to save some extra lines of code this can be written with if/else instead of if case 1 else if case 2.