Filters working

Refactored filters using new filters.js to manage the code, including
different types of filters which can be initialized once. This takes a
lot of the filter-specific code out of codex.js and router.js. It should
also make it much easier to add new filters in the future.