Added foreign keys etc.