Fixed a bug with global settings being passed; Refined filter functions a lot