added _id to the foreign keys
moved embedded objects to the top level