Allow preparing single element or filter. Allow setting properties for multiple elements (for example, hiding a list of elements.). Fix multivar handling to acutally respect the variables you set in the filter specification.
Preliminayr change that would allow new aggregate functions to be defined (without changing existing behavior.) Also chaging the if statement to check for "sum" when deciding whether or not to calculate the sum is more clear. Add one more fix to make sure we don't try to do math on non-numerical data.