We have moved classes from preprocess to templates here. I think it would be good idea to keep heading towards the same target; having as many classes defined in the templates as possible. Place where I think we have most of the classes coming outside of template is render elements.
Move classes from render elements to templates. Other attributes can stay in the render elements and are not being touched by this issue.