Add filtering.js and some tests