Implemented the new main element.