Ensure that records() always returns a list.

A lot of the code stores the items for later, and using an iterator will
result in unhappiness when the data can't be iterated over more than once.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Use new filter logic where possible.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>