Add filters and fix some bugs in Chunks model.