element restructured for export, bug fixes regarding misc