Wrote part of generic element handler.
Fixed non-well-formed element.