Added removal of query filters

Added remove filters and removed pass by reference so it doesn't brick PHP v5.4