Simplify template filter a bit and annotate a little