Bag and Graph adapted to the new metadata system
* made some changes to adapt tables to the new metadata system