Implemented serialization methods for the element