Refactored Shiandow's patch to reduce code duplicates.
Merge pull request #12 from zachsaw/work

Fixed filter not updated when settings changed