Changed filter method API to either store filtered data or a filter function for lazy evaluation