Use module pattern for filtering.js