Nightly: new DB layout, tests (#514).
Nightly: really support filtering (#514).