Fixes highlighting and refactors filters.