Added indexes to all foreign keys to improve performance.