Added "element" base class. Updated structure throughout.