Added foreign keys to relationship tables