[Change] Rewrote the element struct into a class.