Two level filtering implemented. Needs testing on the parsing side