Improvements

Just small improvements.
Changes in 'digitSum' function should raise a performance when library is used in long loops.