Added fields for caching weight and probability.
Updated queries.