Remove redundant code from Element.lua