Fixed bad bug that prevented other than mean class of being taken in count
of mean array. Decorated debugging. Made limits for stabilization so it
never gets too high.