Added get_zeros and get_nonzeros to provide features for QuickCheck feature-based testing.

Fixed some random analysis bugs.