Started adding some functions to stats for sampling. Modified cart.py to accomodate a number of classes greater than 2.