Remove special case for class attribute, can’t be set more than once
Move attribute logic into element view