Updated the database structure to handle more elementtypes