Fixed maxDepth inconsistency, fixed total counts and percents

Fixed maxDepth behavior to match readme examples. Also there was a small bug in computation of total counts and percents. Now variety passes all the defined tests.