Move parameter filtering to where it goes