Issue #2109793 by damiankloip, dawehner, tim.plunkett: Convert element_* methods in common.inc to a class.