simplify and optimize Filters controller and template