Added inserts and foreign keys