remove unused functions
fix query filter handling