Refactor entity dom element class into multiple classes